package com.dunke.core.data.staff;

import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * 员工信息
 */
@Data
public class StaffInfo {

    /**
     * 员工Id
     */
    private Integer id;

    @NotNull(message = "员工姓名不能为空")
    private String name;
    /**
     * 性别
     */
    private Integer sex = 1;

    @Min(value = 18, message = "员工年龄不能小于18岁")
    @Max(value = 60, message = "员工年龄不能大于18岁")
    private Integer age;

    @NotNull(message = "员工手机号码不能为空")
    @Pattern(regexp = "1[3|4|5|7|8][0-9]\\d{8}", message = "手机号码格式错误")
    private String mobile;

    @NotNull(message = "身份证号码不能为空")
    private String idnumber;

    @NotNull(message = "户籍所在省份不能为空")
    private String province;

    @NotNull(message = "户籍所在市不能为空")
    private String city;

    @NotNull(message = "户籍所在县/区不能为空")
    private String district;

    @NotNull(message = "户籍所在详细地址不能为空")
    private String address;

}
